Try to fix Windows CI (GitHub Actions -- vcpkg manifest mode)#518
Conversation
|
thanks @stephengtuggy for the patch ! It's definitely a step in the right direction, but apparently not yet complete (the build fails). |
…sed to the `faber` commands
@stefanseefeld you're welcome. I think I see what the problem is. I neglected to update the include directory passed to the |
|
Nope, still not right. And unfortunately, this may not be trivial to fix. I'm not sure if there is a singular Boost include directory that can be passed to faber. I think it may be more like a different include directory for each Boost component. How to handle this situation? |
…ed for `vcpkgGitCommitId` prior to this PR
|
To eliminate a variable, I am going back to the same vcpkg baseline in the manifest file as was used for |
| vcpkgDirectory: '${{ github.workspace }}/vcpkg' | ||
| runVcpkgInstall: true | ||
| - name: List directory contents | ||
| run: Get-ChildItem "${{ github.workspace }}/vcpkg" -Recurse -Force -File -Filter 'config.hpp' |
There was a problem hiding this comment.
Perhaps if you use -User . to start looking in the local directory instead of $github.workspace/vcpkg ?
Alternatively, I see that the install root can be set via the vcpkgArguments: '--x-manifest-root=${{ github.workspace }}/vcpkg' directive.
There was a problem hiding this comment.
This command simply searches the <github workspace>/vcpkg directory and all subdirectories for a file named config.hpp. It is literally the equivalent of find "${{ github.workspace}}/vcpkg" -iname 'config.hpp' -type f. And it's not finding the file anywhere! I don't understand what is going on here. Why would this file not be present?
I'm not familiar with -User . in conjunction with the Get-ChildItem command. What would that do?
There was a problem hiding this comment.
Yes, the install root can be set using the vcpkgArguments parameter, but I'm not sure it's best practice to do so.
|
It occurs to me that in my other projects that use vcpkg, I generally set the |
…ects that use vcpkg
…bdirectories for config.hpp
|
Well, I can finally see where config.hpp is. It's in directory This raises some more questions: why? Where is this setting coming from? And does the GUID stay the same, or does it change every run? |
|
That's great progress ! But I agree, having to remember and hardcode such paths is cumbersome and fragile, so best to be avoided. So why not replace all that by a manually defined install root (specified vie |
Yes, I guess that makes sense, actually. I was trying to set it using environment variables, but that doesn't seem to be working for some reason. Perhaps something closer to where vcpkg runs is overriding the relevant environment variable. At any rate, the last run worked! So the GUID seems to stay the same with each run. |
|
I don't think |
|
Looks like one can tell vcpkg where to install dependencies using the |
…in `--with-boost-include=` faber parameters
…-boost-include=` faber parameters
|
|
||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 |
There was a problem hiding this comment.
I see you are referring to all actions by sha. Is that really necessary ? Why not use a version tag instead ? Wouldn't that be simpler (more readable, easier to maintain, etc.) ?
There was a problem hiding this comment.
Referring to GitHub Actions by SHA is considered a security best practice. See https://docs.github.com/en/actions/reference/security/secure-use?learn=getting_started#using-third-party-actions .
It's not too difficult to maintain if one uses a tool like Dependabot or Renovate[bot] to keep dependencies up to date, including GitHub Actions dependencies.
There was a problem hiding this comment.
As for readability, I do at least include the version tag in a comment. Hopefully that helps at least a little bit.
There was a problem hiding this comment.
Yes, I noticed. Thanks !
Please go ahead and merge this if you are satisfied with the PR. Many thanks again for all your effort on this ! I wouldn't have been able to pull this off on my own, as I haven't developed on & for Windows in a long time.
Your work will unblock a number of other changes that I was hesitant to add while the Windows build was broken, so I'm thrilled to see this being completed.
Cheers !
There was a problem hiding this comment.
You're welcome! I am satisfied with the PR, but I don't see a Merge button. I probably don't have merge permissions at the moment.
There was a problem hiding this comment.
Ah, makes sense. I suppose only team members have merge (or commit) permission. Let me merge this for now. If you want to contribute in the future, we can consider adding you to the team. Cheers !
Fixes #514 (hopefully)